package com.tct.worktimeboard.entity.enums;

/**
 * @author Huhailong
 * @Description
 * @Date 2021/3/29.
 */
public enum SexEnum {
    MAN("1","男"),
    WOM("2","女"),
    ;
    private String sexCode;
    private String sexName;

    SexEnum(String sexCode, String sexName){
        this.sexCode = sexCode;
        this.sexName = sexName;
    }

    public static String getSexNameFromCode(String sexCode){
        for(SexEnum sex : SexEnum.values()){
            if(sex.getSexCode().equals(sexCode)){
                return sex.getSexName();
            }
        }
        return null;
    }

    public String getSexCode(){
        return sexCode;
    }
    public String getSexName(){
        return sexName;
    }
}
